DECLARE @cliId int, @impId int

BEGIN TRANSACTION

SET @cliId = 41
SET @impId = 340

INSERT INTO [AGAPSAD].[dbo].[Despachos]
           ([Legajo]
           ,[DeclaranteId]
           ,[ImportadorId]
           ,[Creado]
           ,[Caja])
     VALUES
           ('10073IC04025547U'
           ,@cliId
           ,@impId
           ,GETDATE()
           ,173)
GO

IF(@@ERROR <> 0) ROLLBACK TRANSACTION

COMMIT TRANSACTION





